/*
 * 
 * Libman
 * 
 * Daniel Kaufmann, Martin Lang, Simon Moosbrugger,
 * Stefan Mayer, Stephan Halbeisen
 * 
 */
package application.server;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.server.ServerNotActiveException;
import java.util.HashMap;

import middleware.datacontainer.groupPropertiesChange.GroupPropertiesContainer;

import application.exceptions.DatabaseException;
import application.exceptions.InsufficientClientRightsException;
import application.exceptions.SessionException;
import application.exceptions.UserNotInDbException;
import application.exceptions.WrongCredentialsException;

/**
 * The Interface Server.
 */
public interface Server extends Remote{
	
	/**
	 * Gets the medium search use case controller.
	 * 
	 * @return the medium search use case controller
	 * @throws RemoteException
	 *             the remote exception
	 */
	MediumSearchRemote getMediumSearchUseCaseController() throws RemoteException ;
	
	/**
	 * Gets the loan extend controller.
	 * 
	 * @return the loan extend controller
	 * @throws RemoteException
	 *             the remote exception
	 */
	LoanExtendRemote getLoanExtendController() throws RemoteException ;
	
	/**
	 * Gets the medium reserve use case controller.
	 * 
	 * @return the medium reserve use case controller
	 * @throws RemoteException
	 *             the remote exception
	 */
	MediumReserveRemote getMediumReserveUseCaseController() throws RemoteException;
	
	/**
	 * Gets the medium return uase case controller.
	 * 
	 * @return the medium return uase case controller
	 * @throws RemoteException
	 *             the remote exception
	 */
	MediumReturnRemote getMediumReturnUaseCaseController() throws RemoteException;
	
	/**
	 * Gets the client search use case controller.
	 * 
	 * @return the client search use case controller
	 * @throws RemoteException
	 *             the remote exception
	 */
	ClientSearchRemote getClientSearchUseCaseController() throws RemoteException;
	
	/**
	 * Gets the exemplar loan use case controller.
	 * 
	 * @return the exemplar loan use case controller
	 * @throws RemoteException
	 *             the remote exception
	 */
	ExemplarLoanRemote getExemplarLoanUseCaseController() throws RemoteException;
	
	String login(String username, String password) throws RemoteException, ServerNotActiveException, WrongCredentialsException, DatabaseException, UserNotInDbException;
	
	void logout(String sessionid) throws RemoteException;
	
	GroupPropertiesChangeRemote getGroupPropertiesChangeUseCaseController() throws RemoteException;
	
}
